package test1;

import java.sql.SQLOutput;

/**
 * @author: hett
 * @date: 2022/1/12 11:37
 */
public class TestBank {

    public static void main(String[] args) {
        Bank bank0 =new Bank(0,100.00);
        Bank bank1 =new Bank(1,200.00);
        Bank bank2 = new Bank(2,300.00);
        Bank bank3 =new Bank(3,400.00);

        System.out.println(bank0.getDeposit());
        System.out.println(bank1.getDeposit());

        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                bank0.move(bank0,bank1,20.00);
                System.out.println(bank0.getDeposit());
                System.out.println(bank1.getDeposit());
            }
        });
        thread.start();
        System.out.println(Thread.currentThread().getName()+"*******"+Thread.currentThread().getState());
    }


}
